import { QrChannel } from '@shared/interfaces/acquirer'
import { IStoreChannelInAPP, IStoreChannelMiniProgram, IStoreCardChanMer } from '@shared/interfaces/store'
import { IMCC } from '@shared/components/mcc-select/mcc-select.interface'
import { EPaymentBrand } from '@shared/enums'

// 门店渠道编辑框会共用到的一些路由名称的定义
export enum EStoreChannelRouteName {
  CreateStore = 'createStore',
  OpenChannel = 'openChannel',
  EditChannel = 'editChannel',
}

// 门店渠道编辑的渠道组件返回的channel接口体
export interface IStoreChannelFormOutput {
  chanCode: EPaymentBrand // 渠道代码
  paymentBrand: EPaymentBrand // 支付品牌
  intStoreCode?: string // 内部门店号
  chanMerID: QrChannel | string // 渠道商户编号
  chanMerIDSecondary?: string // 二级渠道商户编号
  chanMerNameSecondary?: string // 二级渠道商户名称
  chanMerIDTertiary?: string // 三级渠道商户编号
  chanMerNameTertiary?: string // 三级渠道商户名称
  mcc?: IMCC // 交易MCC
  fee?: number // 商户费率
  currency?: string // 渠道交易币种
  inApp?: IStoreChannelInAPP // 移动支付
  miniprogram?: IStoreChannelMiniProgram // 小程序支付

  chanMerParams?: IChanMerParams // 渠道编辑框配置的选择渠道选择项

  [key: string]: any
  upiMerchantAbbreviation: string
  upiMerchantID?: string
  upiAcquiringIIN?: string
}

export interface IChanMerParams {
  selectedChanMer?: IStoreCardChanMer
  [key: string]: any
}
